
import { createRouter, createWebHistory } from 'vue-router'
// 预加载
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') // 懒加载
  },
  {
    path: '/other',
    name: 'other',
    component: () => import('../views/OtherView.vue')
  },
  {
    path: '/a',
    component: () => import('../views/AView')
  },
  {
    path: '/b',
    component: () => import('../views/BView')
  },
  {
    path: '/c',
    component: () => import('../views/CView')
  },
  {
    path: '/d',
    component: () => import('../views/DView')
  },
  {
    path:'/e',
    component: () => import('../views/EView')
  },
  {
    path:'/f',
    component: () => import('../views/FView')
  },
  {
    path:'/g',
    component: () => import('../views/GView')
  },
  {
    path:'/h',
    component: () => import('../views/HView')
  },
  {
    path:'/i',
    component: () => import('../views/IView')
  },
  {
    path:'/j',
    component: () => import('../views/JView')
  },
  {
    path:'/k',
    component: () => import('../views/KView')
  },
  {
    path:'/l',
    component: () => import('../views/LView')
  },
  {
    path:'/m',
    component: () => import('../views/MView')
  },
  {
    path:'/n',
    component: () => import('../views/NView')
  },
  {
    path:'/o',
    component: () => import('../views/OView')
  },
  {
    path:'/p',
    component: () => import('../views/PView')
  },
  {
    path:'/q',
    component: () => import('../views/QView')
  },
  {
    path:'/r',
    component: () => import('../views/RView')
  },
  {
    path:'/s',
    component: () => import('../views/SView')
  },
  {
    path:'/t',
    component: () => import('../views/TView')
  },
  {
    path:'/u',
    component: () => import('../views/UView')
  },
  {
    path:'/v',
    component: () => import('../views/VView')
  },
  {
    path:'/w',
    component: () => import('../views/WView')
  },
  {
    path:'/x',
    component: () => import('../views/XView')
  },
  {
    path:'/y',
    component: () => import('../views/YView')
  },
  {
    path:'/z',
    component: () => import('../views/ZView')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
